<?php

use Fisharebest\Webtrees\I18N;

?>

<ul class="nav nav-tabs" role="tablist">
    <li class="nav-item" role="presentation">
        <a class="nav-link active<?= $indilist === [] ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#individuals">
            <?= I18N::translate('Individuals') ?>
            <?= view('components/badge', ['count' => count($indilist)]) ?>
        </a>
    </li>
    <li class="nav-item" role="presentation">
        <a class="nav-link<?= $famlist === [] ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#families">
            <?= I18N::translate('Families') ?>
            <?= view('components/badge', ['count' => count($famlist)]) ?>
        </a>
    </li>
</ul>
<div class="tab-content">
    <div class="tab-pane fade show active" role="tabpanel" id="individuals">
        <?php if ($indilist === []) : ?>
            <p><?= I18N::translate('No results found.') ?></p>
        <?php else : ?>
            <?= view('lists/individuals-table', [
            'individuals' => $indilist,
            'sosa'        => false,
            'tree'        => $tree,
            ]) ?>
        <?php endif ?>
    </div>

    <div class="tab-pane fade" role="tabpanel" id="families">
        <?php if ($famlist === []) : ?>
            <p><?= I18N::translate('No results found.') ?></p>
        <?php else : ?>
            <?= view('lists/families-table', ['families' => $famlist, 'tree' => $tree]) ?>
        <?php endif ?>
    </div>
</div>
